const gulp = require('gulp');
const concat = require('gulp-concat');
const uglify = require('gulp-uglify');

gulp.task('css', function() {
    return gulp.src([
            './static/css/main.css'
        ])
        .pipe(concat('main.min.css'))
        .pipe(gulp.dest('./static/css/'))
})
gulp.task('js', function() {
    return gulp.src([
            './static/js/jquery.min.js',
            './static/js/skel.min.js',
            './static/js/util.js',
            './static/js/main.js'
        ])
        .pipe(concat('main.min.js'))
        .pipe(uglify())
        .pipe(gulp.dest('./static/js/'))
})
gulp.task('listen', function() {
    gulp.watch([
        './static/css/*.css'
    ], ['css'])

    gulp.watch([
        './static/js/*.css'
    ], ['js'])
})

gulp.task('default', ['css', 'js'])